#!/usr/bin/env bash

if ! rpm -qa|grep -q ntpdate; then
  yum install -y ntpdate
fi
ntpdate time.windows.com

yum install -y yum-utils
yum-config-manager --setopt=openresty.skip_if_unavailable=true --add-repo http://openresty.org/package/centos/openresty.repo
yum makecache fast
yum install -y openresty
yum install -y openresty-resty
service openresty start
chkconfig openresty on
